From: Steven Tamm Date: Thu, 8 Jul 2004 15:24:54 +0000 (+0000) Subject: term/mac-win.el (mac-scroll-ignore-events, mac-scroll-down) X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~21703 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=502206b9b4eb2886e0609872d2b0c729eaba6c4f;p=emacs.git term/mac-win.el (mac-scroll-ignore-events, mac-scroll-down) (mac-scroll-down-line, mac-scroll-up, mac-scroll-up-line): Do not treat double clicks and triple clicks specially in the scroll bar (preventing strange repositioning problems) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 32abe4c4ae7..b36e1bae10c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2004-07-08 Steven Tamm + + * term/mac-win.el (mac-scroll-ignore-events, mac-scroll-down) + (mac-scroll-down-line, mac-scroll-up, mac-scroll-up-line): + Do not treat double clicks and triple clicks specially in the + scroll bar (preventing strange repositioning problems) + 2004-07-06 Stefan * replace.el (query-replace-regexp-eval): Fix last change. diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index 9a61a8057b4..e42c2151701 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el @@ -68,24 +68,29 @@ (goto-char (window-start window)) (mac-scroll-up-line))))) +(defun mac-scroll-ignore-events () + ;; Ignore confusing non-mouse events + (while (not (memq (car-safe (read-event)) + '(mouse-1 double-mouse-1 triple-mouse-1))) nil)) + (defun mac-scroll-down () (track-mouse - (while (not (eq (car-safe (read-event)) 'mouse-1)) nil) + (mac-scroll-ignore-events) (scroll-down))) (defun mac-scroll-down-line () (track-mouse - (while (not (eq (car-safe (read-event)) 'mouse-1)) nil) + (mac-scroll-ignore-events) (scroll-down 1))) (defun mac-scroll-up () (track-mouse - (while (not (eq (car-safe (read-event)) 'mouse-1)) nil) + (mac-scroll-ignore-events) (scroll-up))) (defun mac-scroll-up-line () (track-mouse - (while (not (eq (car-safe (read-event)) 'mouse-1)) nil) + (mac-scroll-ignore-events) (scroll-up 1))) (defun xw-defined-colors (&optional frame)